<?php

include 'conn.php';


$member = 'shannon';


$result = mysql_query("SELECT * FROM members WHERE username = '". $member ."' limit 1");

if (!$result) {
  echo "An error occured.";
  exit;
}

while($row = mysql_fetch_array($result))
  {
  	$user_id = $row['id'];
  }

$result2 = mysql_query("SELECT * FROM beers_drank WHERE user_id = '". $user_id ."'");

while($row = mysql_fetch_array($result2))
  {
  	echo $row['beer_id'];
  }


?>